COM Error Handling
Each method of a wrapper object returns an HRESULT value. If the method call was successful, it returns S_OK; otherwise it returns a standard COM failure. If any of the methods calls return an HRESULT error code, the client can then call the GetLastError method to retrieve an error string, which is generally the actual IDL error message string.
The table below describes the error return values and their meaning when they are returned within the context of the wrapper method calls.
Error Code |
Meaning |
---|---|
E_ACCESSDENIED |
This error return value occurs in one of two situations:
|
E_ABORT |
This error return value occurs in one of two situations:
Upon receiving the notification and after receiving this error code, the user must not make any other method calls on the wrapper instance, as the underlying IDL object no longer exits. |
E_FAIL |
This error return value occurs in one of two situations:
|